//  [9/16/2013 OMEGA] created

#include <QtWidgets/QWidget>
#include "DuelAssEEditArchiveInGroupDlg.h"
#include "ui_DuelAssEEditArchiveInGroupDlg.h"


DAssEEditArchiveInGroupDlg::DAssEEditArchiveInGroupDlg( QWidget* parent /*= 0*/ ) :
	QDialog(parent),
	mObjectView(this)
{
	ui.setupUi(this);
	mObjectView.setHeaderLabel(tr("Availale Archives"), tr("Current Archives"));
	ui.verticalLayout_2->insertWidget(1,&mObjectView);

}

void DAssEEditArchiveInGroupDlg::setGroupName( const QString& groupName )
{
	QString titleStr = windowTitle();
	titleStr.append(": ").append(groupName);
	setWindowTitle(titleStr);
}

void DAssEEditArchiveInGroupDlg::setAvailableArchives( const QStringList& availableArchs )
{
	mAvailableArchs = availableArchs;
}

void DAssEEditArchiveInGroupDlg::setArchivesOfGroup( const QStringList& archOfGrp )
{
	mGroupArchives = archOfGrp;
}

int DAssEEditArchiveInGroupDlg::exec()
{
	mObjectView.setItems(mAvailableArchs, mGroupArchives);
	return QDialog::exec();
}
